<?= $this->doctype() ?>
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head>  
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <title>AC2 System Controller</title>
  <?= $this->headScript()->appendFile('/js/jquery.js','text/javascript') ?>
  <?= $this->headScript()->appendFile('/js/jquery.timers.js','text/javascript') ?>
  <?= $this->headLink()->appendStylesheet('/css/main.css') ?>
</head> 
<body>
  <div id="hdr"><span>AC<sup>2</sup> System Controller</span></div>
  <div id="framecontent">
    <div id="ac2-monitorgroup" class="innertube">
      <span class="ac2-group-title">Monitor:</span>
      <?php if ($this->nav != "index"): ?>
      <span class="menu"><a href="<?= $this->url(array('controller'=>'index'),'default', true)?>">Current</a></span>
      <?php else : ?>
      <span class="menu-off">Current</span>        
      <?php endif ?>
      <?php if ($this->nav != "stats"): ?>
      <span class="menu"><a href="<?= $this->url(array('controller'=>'stats'), 'default', true) ?>">Statistics</a></span>
      <?php else : ?>
      <span class="menu-off">Statistics</span>        
      <?php endif ?>
    </div>
    <div class="ac2-group-separator">&nbsp;</div>
    <div id="ac2-modegroup" class="innertube">
      <span class="ac2-group-title">Mode:</span>
      <?php if ($this->mode != "cool"): ?>
      <span class="menu"><a title="Switch to cooling mode" href="<?= $this->url(
          array('controller'=>'setting', 'action'=>'mode','value'=>'cool', 'return'=>$this->nav), 
          'default', 
          true) ?>">Cool
      </a></span>
      <?php else : ?>
       <span class="menu-off">Cool</span>
      <?php endif ?>
      <?php if ($this->mode != "heat"): ?>
      <span class="menu"><a title="Switch to heating mode" href="<?= $this->url(
          array('controller'=>'setting', 'action'=>'mode','value'=>'heat', 'return'=>$this->nav), 
          'default', 
          true) ?>">Heat
      </a></span>
      <?php else : ?>
       <span class="menu-off">Heat</span>
      <?php endif ?>
    </div>
    <div class="ac2-group-separator">&nbsp;</div>
    <div id="ac2-scalegroup" class="innertube">
      <span class="ac2-group-title">Scale:</span>
      <?php if ($this->scale != "F"): ?>
      <span class="menu"><a title="Switch to fahrenheit scale" href="<?= $this->url(
          array('controller'=>'setting', 'action'=>'scale','value'=>'F', 'return'=>$this->nav), 
          'default', 
          true) ?>">Fahrenheit
      </a></span>
      <?php else : ?>
       <span class="menu-off">Fahrenheit</span>
      <?php endif ?>
      <?php if ($this->scale != "C"): ?>
      <span class="menu"><a title="Switch to celsius scale" href="<?= $this->url(
          array('controller'=>'setting', 'action'=>'scale','value'=>'C', 'return'=>$this->nav), 
          'default', 
          true) ?>">Celsius
      </a></span>
      <?php else : ?>
       <span class="menu-off">Celsius</span>
      <?php endif ?>
    </div>
  </div>
  <div id="maincontent">
    <div class="innertube">
<?= $this->layout()->content ?>
    </div>
   </div>
</body>
</html>